import { createApp } from 'vue'
import { createPinia } from 'pinia';
import ElementPlus from 'element-plus'
// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import './style.css'
import App from './App.vue'

// permission 权限文件
import './config/permission'

const app = createApp(App)

app.use(ElementPlus)

// 注册组件
import registerComponents from './layouts/components/export';
registerComponents(app);

// 创建 Pinia 实例
const pinia = createPinia();
app.use(pinia);

// router
import router from './router/index';
app.use(router);

// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
//   app.component(key, component)
// }

import iconPark from './plugin/icon-park';
iconPark(app);

app.mount('#app')
